/**
 * mainwindow.h is part of Gedule.
 *
 * Gedule is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Gedule is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Gedule.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

// Forward declarations.
class QProgressBar;

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow( QWidget * a_parent = 0 );
    virtual ~MainWindow();

private slots:

    //void NewModel();
    void Open();
    void Save();
    void SaveAs();
    void About();

private:

    // Fields
    // ------

    std::string m_currentFile;

    QTabWidget * m_centralWidget;

    QMenu *     m_fileMenu;
    QMenu *     m_helpMenu;

    QToolBar *  m_mainToolBar;

    //QAction *   m_newModelAction;
    QAction *   m_openAction;
    QAction *   m_saveAction;
    QAction *   m_saveAsAction;
    QAction *   m_exitAction;
    QAction *   m_aboutAction;

    QProgressBar * m_progressBar;

    static const char * OPEN_ICON;
    static const char * SAVE_ICON;
    static const char * SAVE_AS_ICON;
    static const char * EXIT_ICON;
    static const char * ABOUT_ICON;
    static const char * MODEL_ICON;
    static const char * SCHEDULE_ICON;

    static const char * OPEN_ACTION_TEXT;
    static const char * OPEN_ACTION_TOOLTIP;
    static const char * SAVE_ACTION_TEXT;
    static const char * SAVE_ACTION_TOOLTIP;
    static const char * SAVE_AS_ACTION_TEXT;
    static const char * SAVE_AS_ACTION_TOOLTIP;
    static const char * EXIT_ACTION_TEXT;
    static const char * EXIT_ACTION_TOOLTIP;
    static const char * ABOUT_ACTION_TEXT;
    static const char * ABOUT_ACTION_TOOLTIP;

    static const char * FILE_MENU;
    static const char * HELP_MENU;

    static const char * MAIN_TOOLBAR;

    static const char * WND_TITLE;
    static const char * ABOUT_DLG_TITLE;
    static const char * MODEL_TAB_TITLE;
    static const char * SCHEDULE_TAB_TITLE;

    // Methods
    // -------

    void CreateCentralWidget();
    void CreateActions();
    void CreateMenus();
    void CreateToolBars();
    void CreateStatusBar();
    void ReadSettings();
    void WriteSettings();
    void MapSignalSlots();

    void CloseEvent( QCloseEvent * a_event );
};

#endif // MAINWINDOW_H
